package com.epam.run;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import org.apache.log4j.Logger;

import com.epam.customer.CustomerGenerator;

public class Runner {
	private static Logger logger=Logger.getLogger(Runner.class);
	
	public static void main(String[] args) {
		ExecutorService exec = Executors.newCachedThreadPool();
		exec.execute(new CustomerGenerator());		
		try {
			TimeUnit.SECONDS.sleep(3);
		} catch (InterruptedException e) {
			logger.error(e);
		}
		finally {
			exec.shutdownNow();
		}
	}

}
